package demo_10_11_01;

public class work_01 {
    public static void main(String[] args) {

        String email = "2695106618@qq.com";
        String regex = "\\w[-\\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\\.)+[A-Za-z]{2,14}";
        if(email.matches(regex))
        {
            System.out.println("符合email地址");
            String str = email.substring(email.lastIndexOf(".")+1);
            System.out.println(str);

        }else {
            System.out.println("lian");

        }

    }
}
